package com.xasxt.book.app.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.xasxt.book.app.dao.CategoryDaoMapper;
import com.xasxt.book.app.entity.Category;
/**
 * 功能:
 * 开发者:虫儿飞
 * 开发时间:2018年5月19日 下午2:05:32
 */
@Service
@Transactional(isolation=Isolation.DEFAULT,
rollbackFor=Exception.class,propagation=Propagation.REQUIRED)
public class CategoryService {
	@Autowired
	private CategoryDaoMapper   categoryDaoMapper;



	public boolean saveCategoryInfo(Category c) {
		return categoryDaoMapper.saveCategoryInfo(c)!=0?true:false;
	}

	public List<Category>findCategoryAllInfo()
	{
		return categoryDaoMapper.findCategoryAllInfo();

	}
	
	public int delCategoryInfo(int cId) {
		return categoryDaoMapper.delCategoryInfo(cId);
	}
}
